package com.itclass.queue;

import java.util.AbstractQueue;
import java.util.Collection;
import java.util.Iterator;
import java.util.concurrent.BlockingQueue;
import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.TimeUnit;

/**
 * 抽象的阻塞队列
 * @param <E>
 */

public abstract class AbstractBlockingQueue<E> extends AbstractQueue<E> implements BlockingQueue<E>, java.io.Serializable{

    protected abstract boolean doOffer(E e);

    protected abstract E doPoll(boolean await) throws InterruptedException;


    protected abstract E doTake() throws InterruptedException;

}
